import {createWebHashHistory,createRouter}  from "vue-router";

import index from '../view/index.vue'
import user from '../view/user.vue'
import stadium from "@/view/stadium.vue";
import seat from "@/view/seat.vue";
import match from "@/view/match.vue";
import order from "@/view/order.vue";
import login from "@/view/login.vue";
import ticketResult from "@/view/ticketResult.vue";
const routes = [
    {
        path: '/',
        name: 'index',
        component: index,
        children: [
            {
                path: '/user',
                component: user
            },
            {
                path: '/stadium',
                component: stadium
            },
            {
                path: '/seat',
                component: seat
            },
            {
                path: '/match',
                component: match
            },
            {
                path: '/order',
                component: order
            },
            {
                path: '/ticketResult',
                component: ticketResult
            },
        ]
    },
    {
        path: '/login',
        component: login
    }

]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})
export default router;